<?php
    include_once '../Datos/GestionNoticias.php';
    include_once '../Datos/FechaNoticia.php';
    
    $gestion = new GestionNoticias();
    $listaFechas = $gestion->getMesesConNoticas();
    
    echo "<select id='comboMes' onchange='BuscarNoticasPorMes()'>";
    echo '<option value="0">Ultimas Noticias</option>';
    foreach ($listaFechas as $value) {        
        echo '<option value="'.$value->getYear().'-'.$value->getMes().'">'.$value->getMes().' '.$value->getYear().'</option>';
    }
    echo "</select>";
?>